package ATM;

public class CashDispenser 
{ 
	private int count; 							
	
	public CashDispenser()
	{
		count = 500;   // the initial number of 20$ bills in the ATM machine, meaning 20$ * 500 = 10.000$
	}					 
	
	public void dispenseCash(int amount) // reduces the number of available bills in the ATM for the next transactions
	{
		int billsRequired = amount/20;
		count -= billsRequired;
	}
	
	public boolean isSufficientCashAvailable(int amount)
	{
		int billsRequired = amount/20;
		
		if (count >= billsRequired)
			return true;
		else
			return false;
	}
}
